home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE21 / TIPTRIX / LISTING1.PAS next >
Encoding:
Pascal/Delphi Source File  |  1997-04-16  |  324 b   |  14 lines

  1. begin
  2.  if FControl.Parent <> nil then begin
  3.    wnd := FControl.Parent.Handle;
  4.    Result := S_OK;
  5.  end else if (FControl.Owner <> nil) and
  6.    (FControl.Owner is TWinControl) then begin
  7.    wnd := TWinControl(FControl.Owner).Handle;
  8.    Result := S_OK;
  9.  end else begin
  10.    wnd := 0;
  11.    Result := E_FAIL;
  12.  end;
  13. end;
  14.